<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>

	<bean id="dataSource"
		class="com.mchange.v2.c3p0.ComboPooledDataSource">
		<property name="driverClass"
			value="com.mysql.jdbc.Driver" />
		<property name="jdbcUrl"
			value="jdbc:mysql://localhost:3306/tyms??useUnicode=true&amp;characterEncoding=UTF-8" />
		<!--	 <property name="jdbcUrl" value="jdbc:oracle:thin:@192.168.0.107:1521:orcl" />-->
		<property name="user" value="root" />
		<property name="password" value="123" />
		<property name="minPoolSize" value="3" />
		<property name="maxPoolSize" value="15" />
		<property name="maxStatements" value="0" />
		<property name="acquireIncrement" value="3" />
		<property name="maxIdleTime" value="5000" />
	</bean>

	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref local="dataSource"/>
		</property>
		<property name="mappingResources">
			<ref bean="mappingResources"/>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
				<prop key="hibernate.cache.use_query_cache">false</prop>
				<prop key="hibernate.show_sql">false</prop>
				<prop key="hibernate.jdbc.fetch_size">50</prop>
				<prop key="hibernate.jdbc.batch_size">100</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
			</props>
		</property>
	</bean>

	<bean id="hbmTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
		<property name="sessionFactory">
			<ref local="sessionFactory"/>
		</property>
	</bean>
	
	<bean id="baseDAO" class="com.jd.ty.dao.BaseDAO" abstract="true">
		<property name="hbmTemplate">
			<ref bean="hbmTemplate"/>
		</property>
	</bean>
	

	<bean id="userDAO" parent="baseDAO" class="com.jd.ty.dao.UserDAO"/>
	<bean id="functionDAO" parent="baseDAO" class="com.jd.ty.dao.FunctionDAO"/>
	<bean id="employeeDAO" parent="baseDAO" class="com.jd.ty.dao.EmployeeDAO"/>
	<bean id="roleDAO" parent="baseDAO" class="com.jd.ty.dao.RoleDAO"/>
	<bean id="permissionDAO" parent="baseDAO" class="com.jd.ty.dao.PermissionDAO"/>
	<bean id="dictionaryDAO" parent="baseDAO" class="com.jd.ty.dao.DictionaryDAO"/>
	<bean id="customerCompanyDAO" parent="baseDAO" class="com.jd.ty.dao.CustomerCompanyDAO"/>
	<bean id="customerDAO" parent="baseDAO" class="com.jd.ty.dao.CustomerDAO"/>
	<bean id="projectAttrbuteDAO" parent="baseDAO" class="com.jd.ty.dao.ProjectAttrbuteDAO"/>
	<bean id="orderDAO" parent="baseDAO" class="com.jd.ty.dao.OrderDAO"/>
	<bean id="logDAO" parent="baseDAO" class="com.jd.ty.dao.AppreciationLogDAO"/>
	<bean id="contractDAO" parent="baseDAO" class="com.jd.ty.dao.ContractDAO"/>
	<bean id="fieldDAO" parent="baseDAO" class="com.jd.ty.dao.FieldDAO"/>
</beans>
